package com.bci.pwtz.mysql.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.bci.pwtz.mysql.model.Dydlfjx;

public interface DydlfjxMapper {
    int deleteByPrimaryKey(String deviceid);

    int insert(Dydlfjx record);

    int insertSelective(Dydlfjx record);

    Dydlfjx selectByPrimaryKey(String deviceid);

    int updateByPrimaryKeySelective(Dydlfjx record);

    int updateByPrimaryKey(Dydlfjx record);
    
    List<Dydlfjx> selectDeviceList(@Param("name")String name,@Param("portalType")int portalType,@Param("medLineCodes")String[] medLineCodes,@Param("lineCode")String lineCode,@Param("companyids")String[] companyids,@Param("companyid")Long companyId,@Param("beginTime")String beginTime,@Param("endTime")String endTime,@Param("beginIndex")int beginIndex,@Param("pageSize")int pageSize,@Param("currentDeviceId")String currentDeviceId);
    
    int selectDeviceCount(@Param("name")String name,@Param("portalType")int portalType,@Param("medLineCodes")String[] medLineCodes,@Param("lineCode")String lineCode,@Param("companyids")String[] companyids,@Param("companyid")Long companyId,@Param("beginTime")String beginTime,@Param("endTime")String endTime);
    
    int deleteById(@Param("deviceid")String deviceid,@Param("lastmodifiedtime")Date time);
    
    List<Dydlfjx> getSamePreDeviceList(@Param("deviceid")String deviceid);
    
    List<Dydlfjx> selectByPreDeviceCode(@Param("predevicecode")String predevicecode);
    
    int updateLastSyncDevice(@Param("companyId")Long companyId,@Param("lastSyncTime")String lastSyncTime);
}